package ordersModel

import (
	"gitee.com/libwiki/lib-mall/models"
	"gitee.com/libwiki/lib-mall/package/vars"
)

// Orders 主订单
type Orders struct {
	Code           string    `json:"code" gorm:"type:varchar(64);comment:订单唯一code"`
	Uid            uint      `json:"uid" gorm:"comment:所属用户"`
	StoreId        uint      `json:"store_id" gorm:"comment:所属门店"`
	CarriageAmount float64   `json:"carriage_amount" gorm:"type:decimal(12,2);default:0;comment:运费总额"`
	DiscountAmount float64   `json:"discount_amount" gorm:"type:decimal(12,2);default:0;comment:总优惠金额"`
	PayAmount      float64   `json:"pay_amount" gorm:"type:decimal(12,2);default:0;comment:总应付金额"`
	PaidAmount     float64   `json:"paid_amount" gorm:"type:decimal(12,2);default:0;comment:已付金额"`
	Status         vars.Enum `json:"status" gorm:"default:wait_pay;type:enum('wait_pay','wait_ship','wait_receive','finish');comment:待支付、待发货、待收货、已完成"`

	models.BaseModel
	models.DeleteField
}
